import Vue from 'vue'
import Router from 'vue-router'
import main from '@/components/main'
import index from '@/components/index'
import mine from '@/components/mine'
import search from '@/components/search'
import detail from '@/components/detail'//城市详情
import areaDetail from '@/components/areaDetail'//景区详情
import setting from '@/components/setting'//设置
import settingLanguage from '@/components/settingLanguage'//设置语言
import settingAutoplay from '@/components/settingAutoplay'//设置自动播放
import settingNotice from '@/components/settingNotice'//通知
import settingSuggest from '@/components/settingSuggest'//建议
import listOffline from '@/components/listOffline'//我的离线
import listFoot from '@/components/listFoot'//我的足迹
import listSave from '@/components/listSave'//我的收藏
import searchList from '@/components/searchList'//搜索列表
import logregist from '@/components/comment/logregist/logregist'//登陆注册
import findPass  from '@/components/findPass'//找回密码
import about  from '@/components/about'//关于
import map  from '@/components/map'//地图
import trans  from '@/components/trans'//翻译

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      //name: 'main',
      component: main,
      children:[
        {
          path: '/',
          name: 'logregist',
          component: logregist,
          meta:{
            index:0
          }
        },{
          path: '/index',
          name: 'index',
          component: index,
          meta:{
            index:0
          }
        },{
          path: '/mine',
          name: 'mine',
          component: mine,
          meta:{
            index:0
          }
        },{
          path: '/search',
          name: 'search',
          component: search,
          meta:{
            index:1
          }
        },{
          path: '/detail',
          name: 'detail',
          component: detail,
          meta:{
            index:1
          }
        },{
          path: '/areaDetail',
          name: 'areaDetail',
          component: areaDetail,
          meta:{
            index:3
          }
        },{
          path: '/setting',
          name: 'setting',
          component: setting,
          meta:{
            index:1
          }
        },{
          path: '/settingLanguage',
          name: 'settingLanguage',
          component: settingLanguage,
          meta:{
            index:2
          }
        },{
          path: '/settingAutoplay',
          name: 'settingAutoplay',
          component: settingAutoplay,
          meta:{
            index:2
          }
        },{
          path: '/settingNotice',
          name: 'settingNotice',
          component: settingNotice,
          meta:{
            index:2
          }
        },{
          path: '/settingSuggest',
          name: 'settingSuggest',
          component: settingSuggest,
          meta:{
            index:2
          }
        },{
          path: '/listOffline',
          name: 'listOffline',
          component: listOffline,
          meta:{
            index:1
          }
        },{
          path: '/listFoot',
          name: 'listFoot',
          component: listFoot,
          meta:{
            index:1
          }
        },{
          path: '/listSave',
          name: 'listSave',
          component: listSave,
          meta:{
            index:1
          }
        },{
          path: '/searchList',
          name: 'searchList',
          component: searchList,
          meta:{
            index:2
          }
        },{
          path: '/findPass',
          name: 'findPass',
          component: findPass,
          meta:{
            index:2
          }
        },{
          path: '/about',
          name: 'about',
          component: about,
          meta:{
            index:2
          }
        },{
          path: '/map',
          name: 'map',
          component: map,
          meta:{
            index:2
          }
        },{
          path: '/trans',
          name: 'trans',
          component: trans,
          meta:{
            index:0
          }
        }
      ]
    }
  ]
})

